Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark mode #359

Merged
merged 82 commits into from
Jul 1, 2020
Merged

Dark mode #359

merged 82 commits into from
Jul 1, 2020

Conversation

jerelmiller
Copy link
Contributor

@jerelmiller jerelmiller commented Jun 30, 2020

Closes #310

Description

Implement dark mode for the developer site. Adds the color palette and updates existing usage of colors to work with an abstracted set of values.

Screenshot(s)

localhost_8000_ (2)

@djsauble
Copy link
Contributor

djsauble commented Jul 1, 2020

Hamburger on mobile needs dark mode styling

Screen Shot 2020-07-01 at 9 30 08 AM

@jerelmiller
Copy link
Contributor Author

@djsauble Fixed with 6ea0fab

@jerelmiller jerelmiller removed the work in progress This is work that is not yet ready for review label Jul 1, 2020
Copy link
Contributor

@caylahamann caylahamann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a bug with the code blocks
When you refresh the page, the theme does not stay in the dark theme

Steps to reproduce:

  1. Go to a page with code blocks (I went to Query Data with NRQL)
  2. Switch to dark mode
  3. Refresh the page

Screenshots

Screen Shot 2020-07-01 at 2 15 40 PM

I also noticed that the sidebar then expands all the way when refreshing

zstix
zstix previously approved these changes Jul 1, 2020
Copy link
Contributor

@zstix zstix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fantastic!

One minor comment, but I wouldn't block the PR for it.

</ExternalLink>
</li>
<li className={styles.rightSideButton}>
<FeatherIcon
name={darkMode.value ? 'sun' : 'moon'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: I noticed that, when the site first loads, the moon icon is displayed momentarily. I suspect this is due to darkMode.value being falsy. We may want to not show the icon at all until we have access to that variable. It seems like the OSS site operates this way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might log this as a separate issue. I think it has to do with the fact that its a pre-rendered page, which doesn't have access to the local storage/media queries. Even if we hide it, there will still be a flash of content, which would be nice to avoid altogether.

Thoughts? Or should I try and solve this in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out it's more complicated than I thought. I logged this issue in #385. Its annoying, but not a blocker for now, so lets fix at a later time. This will allow us to get this out the door sooner.

@jerelmiller
Copy link
Contributor Author

You're right. Good catch. I need to do a bit of research to determine how to avoid this scenario. I suspect its because this page is "server rendered", with no access to local storage or media queries.

@jerelmiller
Copy link
Contributor Author

I also noticed that the sidebar then expands all the way when refreshing

This bug is logged in #340 and outside the scope of this PR since its an existing bug.

Copy link
Contributor

@zstix zstix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌔

@jerelmiller jerelmiller merged commit 6919c9b into master Jul 1, 2020
@jerelmiller jerelmiller deleted the jerel/dark-mode branch July 1, 2020 21:21
@nr-opensource-bot
Copy link
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Dark Mode in the New Dev Ex Site
7 participants